package com.heima.apis.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.ChannelDto;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia")
public interface IWemediaClient {
        /**
         *  查询敏感词列表
         */
        @PostMapping("/api/v1/sensitive/list")
        public ResponseResult list(@RequestBody WmSensitiveDto dto);

        /**
         * 新增敏感词
         */
        @PostMapping("/api/v1/sensitive/save")
        public ResponseResult save(@RequestBody WmSensitive wmSensitive);

        /**
         * 删除敏感词
         */
        @DeleteMapping("/api/v1/sensitive/del/{id}")
        public ResponseResult delete(@PathVariable Integer id);

        /**
         * 修改敏感词
         */
        @PostMapping("/api/v1/sensitive/update")
        public ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

        /**
         * 频道列表
         */
        @PostMapping("api/v1/channel/list")
        public ResponseResult findAll(@RequestBody ChannelDto dto);

        /**
         * 添加频道
         */
        @PostMapping("api/v1/channel/save")
        public ResponseResult save(@RequestBody WmChannel wmChannel);

        /**
         * 删除频道
         */
        @GetMapping("api/v1/channel/del/{id}")
        public ResponseResult deleteChannel(@PathVariable Integer id);

        /**
         * 修改频道
         */
        @PostMapping("api/v1/channel/update")
        public ResponseResult update(@RequestBody WmChannel wmChannel);

}


